package com.zy.swagger.controller.sys;

import com.zy.swagger.dto.DingDeptDTO;
import com.zy.swagger.service.sys.DingTalkService;
import com.zy.swagger.vo.ResultVO;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * description 钉钉交互控制器
 *
 * @author ZY
 * @date 2021年04月03日 20:40
 **/
@Api(tags = "钉钉组织机构管理")
@Slf4j
@RestController
@RequestMapping("/dingTalk")
public class DingTalkController {

    @Resource
    private DingTalkService dingTalkService;

    @GetMapping("/getDingDeptList")
    public ResultVO<List<DingDeptDTO>> getDingDeptList() {
        return ResultVO.getSuccess(dingTalkService.getDingDeptList());
    }

}
